package com.walle.concurrenttest.waitnotify;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.waitnotify
 * @Description: ${todo}
 * @date 2019/2/18 10:12
 */
public class OddEvenPrint {

    private int num;

    public OddEvenPrint(int num) {
        this.num = num;
    }

    public void print(){
        String threadName = Thread.currentThread().getName();
        System.out.println(threadName + "打印：" + num);
        num++;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
